]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
environment: Use replaceAll()
authorAlessandro Bono <alessandro.bono369@gmail.com>
Fri, 20 Feb 2026 22:57:14 +0000 (23:57 +0100)
committerMarge Bot <marge-bot@gnome.org>
Mon, 23 Feb 2026 20:25:10 +0000 (20:25 +0000)
The replace() function expects two parameters, likely the third one
was ignored. Use replaceAll() to replace all the occurrences, not
just the first one.

Fixes: 007b6ca2e ("environment: Add convenience method for implicit animations")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4084>

js/ui/environment.js

index f4ff303d7e77d40c3cbb70151b850815cf7737f4..2e5baa97ea04e183010370dab9a8590605efa7f2 100644 (file)
@@ -159,7 +159,7 @@ function _easeActor(actor, params) {
     const {promise, callback} = _makeEaseCallback(params, cleanup);
 
     // cancel overwritten transitions
-    const animatedProps = Object.keys(params).map(p => p.replace('_', '-', 'g'));
+    const animatedProps = Object.keys(params).map(p => p.replaceAll('_', '-'));
     animatedProps.forEach(p => actor.remove_transition(p));
 
     if (easingDuration > 0 || !isReversed)